package br.lotr.entidades;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


@Entity
@Table(name="lotr_Blocos")
public class Bloco implements Serializable{

	private static final long serialVersionUID = -5213486342337067982L;
	@Id
	@Column(name="id_bloco")
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;
	@Column(name="ds_bloco",nullable=false)
	private String bloco;
	@Temporal(TemporalType.DATE)
	private Calendar dt_lancamento;

	public String getBloco() {
		return bloco;
	}
	public void setBloco(String bloco) {
		this.bloco = bloco;
	}
	public Calendar getDt_lancamento() {
		return dt_lancamento;
	}
	public void setDt_lancamento(Calendar dt_lancamento) {
		this.dt_lancamento = dt_lancamento;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Bloco other = (Bloco) obj;
		if (id != other.id)
			return false;
		return true;
	}
	
	

}
